<?php

namespace zhtfrontend\models\datas;

use Yii;

/**
 * This is the model class for table "{{%orders_activity_log}}".
 *
 * @property integer $id
 * @property integer $orders_id
 * @property integer $activity_id
 * @property string $type
 * @property string $name
 * @property integer $use_time
 */
class OrdersActivityLog extends \zhtfrontend\components\bases\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%orders_activity_log}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['orders_id', 'activity_id', 'use_time'], 'integer'],
            [['type'], 'string', 'max' => 20],
            [['name'], 'string', 'max' => 100]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('zhtfrontend', '自增编码'),
            'orders_id' => Yii::t('zhtfrontend', '订单id'),
            'activity_id' => Yii::t('zhtfrontend', '活动id'),
            'type' => Yii::t('zhtfrontend', '活动类型（goods/order/customer）'),
            'name' => Yii::t('zhtfrontend', ' 活动名称'),
            'use_time' => Yii::t('zhtfrontend', '使用时间'),
        ];
    }
}
